const productTypeList = [
    {
        "productId": "3",
        "productCode": "01",
        "productName": "螺纹钢",
        "parentId": "1",
        "bmSpecInfoList": null,
      },
      {
        "productId": "4",
        "productCode": "02",
        "productName": "线材",
        "parentId": "1",
        "bmSpecInfoList": null,
      },
      {
        "productId": "5",
        "productCode": "03",
        "productName": "热轧卷",
        "parentId": "2",
        "bmSpecInfoList": null,
      },
]

const categoryList = [
    {
        "dictId": "1",
        "parentId": null,
        "dictCategoryId": "1",
        "dictCode": "10",
        "dictName": "自提",
        "extraProp1": "0",
        "extraProp2": "0",
        "extraProp3": "0",
        "inlineTag": "0",
        "dictStatus": "1",
        "tenantId": "1",
      },
      {
        "dictId": "2",
        "parentId": null,
        "dictCategoryId": "1",
        "dictCode": "20",
        "dictName": "代运",
        "extraProp1": "1",
        "extraProp2": "1",
        "extraProp3": "1",
        "inlineTag": "1",
        "dictStatus": "1",
        "tenantId": "1",
      },
]

const deptList2 = [
    {
        label:'厂内成品库1 可提量：10/200',
        value:'1',
    },
    {
        label:'厂内成品库2 可提量：20/300',
        value:'2',
    },
]

const deptList = [
    {
      "depotId": "1",
      "depotCode": "11",
      "depotName": "11",
      "tenantId": "1",
    },
  ]

function getDictionaryByCategory(req,res){
    const param = req.query;
    console.log(param);
    const dataList = categoryList.filter( category => {
        if(category.dictCategoryId === param.category || category.dictStatus === param.status){
            return category
        }
    })
    res.json(dataList);
}

export default {
    productTypeList,
    getDictionaryByCategory,
    deptList,
}

